import java.util.LinkedList;
import java.util.Scanner;

public class MonkyKing {
    public static void main(String[] args) {
        LinkedList<Integer> monkies = new LinkedList<Integer>();
        Scanner read = new Scanner(System.in);
        int n = read.nextInt();
        monkies.add(4);
        monkies.add(54);
        monkies.add(7);
        monkies.add(15);
        monkies.add(45);
        monkies.add(43);
        monkies.add(6);
        int i = 0;
        LinkedList<Integer> tmp = new LinkedList<>();
        while (monkies.size() > 1)
        {
            if((i + 1) % n == 0){
                monkies.remove(0);;
                while(!tmp.isEmpty())
                    monkies.add(tmp.remove());
            }
            else
                tmp.add(monkies.remove(0));
            i++;
        }
        System.out.println("KING is " + monkies.element() + " !");
    }
}
